package io.renren.modules.gengyun.service.impl;

import io.renren.modules.gengyun.dao.IndicatorDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.gengyun.dao.IndicatorInfoDao;
import io.renren.modules.gengyun.entity.IndicatorInfoEntity;
import io.renren.modules.gengyun.service.IndicatorInfoService;


@Service("indicatorInfoService")
public class IndicatorInfoServiceImpl extends ServiceImpl<IndicatorInfoDao, IndicatorInfoEntity> implements IndicatorInfoService {

    @Autowired
    private IndicatorInfoDao indicatorInfoDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<IndicatorInfoEntity> page = this.page(
                new Query<IndicatorInfoEntity>().getPage(params),
                new QueryWrapper<IndicatorInfoEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public String getIndicatorNames(String targetName) {
        return indicatorInfoDao.getIndicatorNames(targetName);
    }

}